<template>
  <!--  表头 -->
  <div class="header">
    <div>表头</div>
    <div v-for="(value, key) in obj">{{ value }}</div>
  </div>
  <!-- 表格内容 -->
  <div class="header">
    <div>内容</div>
    <div style="display: flex" v-for="(item, index) in data">
      {{ item }}
      <div v-for="(value, key) in obj">
        {{ key }}
        {{ item[key] }}
      </div>
    </div>
  </div>
</template>
<script setup>
const obj = {
  name: "姓名",
  phone: "手机号",
};

const data = [
  { name: "小明", phone: "18999999" },
  { name: "小黄", phone: "18989999" },
];
</script>
<style>
.header {
  border: 1px solid #000;
  display: flex;
}
</style>
